package com.qiyang.message.controller;

import com.qiyang.message.emai.MailInfo;
import com.qiyang.message.emai.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2018/7/6.
 *
 * @author sehuaqi.
 * 描述：
 */
@RestController
@RequestMapping("")
public class MessageController {

    @Autowired
    private MailService mailService;

    @PostMapping("/email")
    private String sendEmail(@RequestBody MailInfo mailInfo){

        mailService.sendEmail(mailInfo);

        return "ok";
    }

}
